package com.hb.core.pojo.center.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hb.core.pojo.center.sys.dto.ConsoleItemDTO;
import com.hb.core.pojo.center.sys.entity.ConsoleItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 操作台控制按钮信息表 Mapper 接口
 * </p>
 *
 * @author zhaojk
 * @since 2021-11-29
 */
public interface ConsoleItemMapper extends BaseMapper<ConsoleItem> {

    List<ConsoleItemDTO> itemChecked(Long statusId);

    int removeByStatusId(Long statusId);

    @Select("select max(sort_code) from sys_console_item where parent_id=#{parentId}")
    BigDecimal maxSort(Long parentId);

}
